// redux 通俗的话来说，就是一个数据仓库
import {legacy_createStore as createStore,applyMiddleware} from "redux"
// applyMiddleware 是用来处理中间件的
import thunk from "redux-thunk"
import logger from "redux-logger"
// redux-thunk 是用来处理异步的中间件
// reducer , action ,dispacth，state
// reducer 就是一个函数，这个函数，接收两个参数，第一个参数，state ，第二个参数action
import {combineReducers} from "redux" // 合并抽离之后的reducer的
import appreducer from "./appreducer"
let reducer = combineReducers({
    appreducer
})

export default createStore(reducer,applyMiddleware(thunk,logger))